﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using Happy.ExtentionMethods;
using Happy.Bootstrap;

namespace Happy.Bootstrap.AutoMapper
{
    /// <summary>
    /// 扩展<see cref="IBootstrapService"/>。
    /// </summary>
    public static class IBootstrapServiceExtentions
    {
        /// <summary>
        /// 和 AutoMapper 进行集成。
        /// </summary>
        public static IBootstrapService IntegrateWithAutoMapper(this IBootstrapService that)
        {
            that.MustNotNull("that");

            return that.AddPlugin(new AutoAddProfilePlugin());
        }
    }
}
